package com.example.dao;

import com.example.sources.annotation.MyRepository;
import com.example.sources.annotation.Query;
import com.example.entity.UserInfo;

import java.util.List;

/**
 * Created by Administrator on 2016/9/18.
 */
@MyRepository
public interface UserDao {

    @Query(value = "select * from userinfo where username = ?")
    public UserInfo findByname(String username);

    @Query(value = "select count(*) from userinfo where username = ?")
    public Long findBynameCount(String username);

    @Query(value = "select password from userinfo where username = ?")
    public String findPasswordBynameCount(String username);


    @Query(value = "select * from userinfo where type = ?")
    public List<UserInfo> findByType(int type);


}
